﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="EmployeeDetailControl.ascx.vb" Inherits="SISSAT.WebDevelopment.Shared.UserControls.EmployeeDetailControl" %>
<%@ Register TagPrefix="sissat" TagName="CourseControl" Src="/Shared/UserControls/CourseControl.ascx" %>
<div class="input">
	<div class="label"><div></div>ID</div>
	<div class="data"><asp:TextBox ID="IdTextBox" runat="server" CssClass="textbox readonly" ReadOnly="True" /></div>
</div>
<sissat:CourseControl ID="CourseControl" runat="server" IsReadOnly="true" />
<div class="input">
	<div class="label">
        <asp:RequiredFieldValidator ID="YearRequiredFieldValidator" runat="server"
                                    Display="Static" 
                                    ErrorMessage="*" 
                                    ControlToValidate="YearTextBox" 
                                    ValidationGroup="EmployeeDetailControlGroup"
                                    CssClass="error" />
        Year</div>
	<div class="data"><asp:TextBox ID="YearTextBox" runat="server" CssClass="textbox req" ReadOnly="False" />
        <asp:RegularExpressionValidator ID="YearRegExValidator" runat="server"
                                        Display="Dynamic"
                                        ErrorMessage="Invalid student year. (e.g. 1 - 4)" 
                                        ControlToValidate="YearTextBox" 
                                        ValidationGroup="EmployeeDetailControlGroup"
                                        CssClass="error" />
    </div>
</div>
<asp:MultiView ID="EmployeeDetailControlViews" runat="server" ActiveViewIndex="0">
    <asp:View ID="PartialReadOnlyView" runat="server">
        <div class="input">
	        <div class="label">
                <asp:RequiredFieldValidator ID="FullNameRequiredFieldValidator" runat="server" 
                                            Display="Static"
                                            ErrorMessage="*" 
                                            ControlToValidate="FullNameTextBox" 
                                            ValidationGroup="EmployeeDetailControlGroup"
                                            CssClass="error" />
                Name</div>
	        <div class="data"><asp:TextBox ID="FullNameTextBox" runat="server" CssClass="textbox readonly" ReadOnly="True" /></div>
        </div>
    </asp:View>
    <asp:View ID="DefaultView" runat="server">
        <div class="input">
	        <div class="label">
                <asp:RequiredFieldValidator ID="FirstNameRequiredFieldValidator" runat="server" 
                                            Display="Static"
                                            ErrorMessage="*" 
                                            ControlToValidate="FirstNameTextBox" 
                                            ValidationGroup="EmployeeDetailControlGroup"
                                            CssClass="error" />
                First Name</div>
	        <div class="data"><asp:TextBox ID="FirstNameTextBox" runat="server" CssClass="textbox req" ReadOnly="False" /></div>
        </div>
        <div class="input">
	        <div class="label"><div></div>Middle Name</div>
	        <div class="data"><asp:TextBox ID="MiddleNameTextBox" runat="server" CssClass="textbox" ReadOnly="False" /></div>
        </div>
        <div class="input">
	        <div class="label">
                <asp:RequiredFieldValidator ID="LastNameRequiredFieldValidator" runat="server" 
                                            Display="Static"
                                            ErrorMessage="*" 
                                            ControlToValidate="LastNameTextBox" 
                                            ValidationGroup="EmployeeDetailControlGroup"
                                            CssClass="error" />
                Last Name</div>
	        <div class="data"><asp:TextBox ID="LastNameTextBox" runat="server" CssClass="textbox req" ReadOnly="False" /></div>
        </div>
        <div class="input">
	        <div class="label">
                <asp:RequiredFieldValidator ID="HomeAddressRequiredFieldValidator" runat="server" 
                                            Display="Static"
                                            ErrorMessage="*" 
                                            ControlToValidate="HomeAddressTextBox" 
                                            ValidationGroup="EmployeeDetailControlGroup"
                                            CssClass="error" />
                Home Address</div>
	        <div class="data"><asp:TextBox ID="HomeAddressTextBox" runat="server" CssClass="textbox req" ReadOnly="False" /></div>
        </div>
        <div class="input">
	        <div class="label"></div>
	        <div class="data"><asp:TextBox ID="HomeAddressExtensionTextBox" runat="server" CssClass="textbox" ReadOnly="False" /></div>
        </div>
    </asp:View>
</asp:MultiView>
<div class="input">
	<div class="label">
        <asp:RequiredFieldValidator ID="ContactNumberRequiredFieldValidator" runat="server" 
                                    Display="Static"
                                    ErrorMessage="*" 
                                    ControlToValidate="ContactNumberTextBox" 
                                    ValidationGroup="EmployeeDetailControlGroup"
                                    CssClass="error" />
        Contact Number</div>
	<div class="data"><asp:TextBox ID="ContactNumberTextBox" runat="server" CssClass="textbox req" ReadOnly="False" />
        <asp:RegularExpressionValidator ID="ContactNumberRegExValidator" runat="server"
                                        Display="Dynamic"
                                        ErrorMessage="Invalid contact number format." 
                                        ControlToValidate="ContactNumberTextBox" 
                                        ValidationGroup="EmployeeDetailControlGroup"
                                        CssClass="error" />
    </div>
</div>
<div class="input">
	<div class="label">
        <asp:RequiredFieldValidator ID="EmailAddressRequiredFieldValidator" runat="server" 
                                    Display="Static"
                                    ErrorMessage="*" 
                                    ControlToValidate="EmailAddressTextBox" 
                                    ValidationGroup="EmployeeDetailControlGroup"
                                    CssClass="error" />
        E-mail Address</div>
	<div class="data"><asp:TextBox ID="EmailAddressTextBox" runat="server" CssClass="textbox req" ReadOnly="False" />
        <asp:RegularExpressionValidator ID="EmailAddressRegExValidator" runat="server"
                                        Display="Dynamic"
                                        ErrorMessage="Invalid e-mail address format." 
                                        ControlToValidate="EmailAddressTextBox" 
                                        ValidationGroup="EmployeeDetailControlGroup"
                                        CssClass="error" />
    </div>
</div>
<div class="input">
<asp:MultiView ID="ButtonViews" runat="server" ActiveViewIndex="0">
    <asp:View ID="DefaultButtonView" runat="server"></asp:View>
    <asp:View ID="SubmitButtonView" runat="server">
    <div class="label"></div>
    <div class="data">
        <div class="error"><%=ErrorMessage%></div>
        <div class="buttons">
	        <asp:Button ID="SubmitButton" runat="server" CssClass="button" Text="Save Changes" ToolTip="Save Changes" ValidationGroup="EmployeeDetailControlGroup" />
            <asp:Button ID="ClearButton" runat="server" CssClass="button" Text="Clear" ToolTip="Clear" />
        </div>
    </div>
    </asp:View>
</asp:MultiView>
</div>

